#ifndef B2D_PLATFORM_H
#define B2D_PLATFORM_H

// Platforms
enum
{
	B2D_PLATFORM_INVALID,
	B2D_PLATFORM_WIN32,
	B2D_PLATFORM_LINUX,
	B2D_PLATFORM_APPLE,
	B2D_PLATFORM_ANDROID,
	B2D_PLATFORM_IPHONE,
	B2D_PLATFORM_PS3,
	B2D_PLATFORM_XBOX,
	B2D_PLATFORM_NDS
};

// Get platform
#if defined( ANDROID )
#	define B2D_PLATFORM B2D_PLATFORM_ANDROID
#elif defined( _WIN32 ) || defined( __WIN32__ )
#   define B2D_PLATFORM B2D_PLATFORM_WIN32
#elif defined( __APPLE__) || defined( __MACH__ )
#   define B2D_PLATFORM B2D_PLATFORM_APPLE
#elif defined( __linux__ )
#   define B2D_PLATFORM B2D_PLATFORM_LINUX
#else
#   define B2D_PLATFORM B2D_PLATFORM_INVALID
#endif

// Forcing inline
#if defined( _MSC_VER ) && _MSC_VER >= 1200
#define FORCE_INLINE __forceinline
#else
#define FORCE_INLINE __inline
#endif

#if B2D_PLATFORM == B2D_PLATFORM_WIN32
#define NOMINMAX
#include <Windows.h>
#elif B2D_PLATFORM == B2D_PLATFORM_ANDROID
#include <stdio.h>
#include <stdlib.h>
#endif


#if defined(_DEBUG) || defined(DEBUG)
#define B2D_DEBUG true
#endif


#if defined(_NASSERT)
#define B2D_ASSERT(exp, ...) (void)exp
#else
#include <assert.h>
#define B2D_ASSERT(exp, ...) assert(exp)
#endif

#endif